#!bin/bash
#

read -p "文件名称: " name

if [ -f $name ];then
   if grep "^$" $name &> /dev/null; then
      number=$(grep "^$" $name | wc -l)
      echo "文件${name}空行数量: $number"
   else
      echo "文件${name}无空行,空行数量:0"
   fi
else
   echo "文件${name}不存在"
fi
